<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<link rel="Bookmark" href="imgs/favicon.ico"/>
	<link rel="Shortcut Icon" href="imgs/favicon.ico"/>
	<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css"/>
	<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css"/>
	<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css"/>
	<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin"/>
	<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css"/>
	<link href="lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css"/>
	<title>商城</title>
</head>
<body>
<article class="cl pd-20">
	<form class="form form-horizontal" id="form-member-add">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">订单号：</label>
			<div class="formControls col-xs-8 col-sm-8" id="orderno"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">买家：</label>
			<div class="formControls col-xs-8 col-sm-8" id="buyer"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">商品名称：</label>
			<div class="formControls col-xs-8 col-sm-8" id="gname"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">商品图片：</label>
			<div class="formControls col-xs-8 col-sm-8" id="gimg"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">商品小计（元）：</label>
			<div class="formControls col-xs-8 col-sm-8" id="sku_price"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">活动优惠（元）：</label>
			<div class="formControls col-xs-8 col-sm-8" id="coupon"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">总数量：</label>
			<div class="formControls col-xs-8 col-sm-8" id="sku_num"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">实付款（元）：</label>
			<div class="formControls col-xs-8 col-sm-8" id="realPay"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">SKU名称：</label>
			<div class="formControls col-xs-8 col-sm-8" id="sku_name"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">配送方式：</label>
			<div class="formControls col-xs-8 col-sm-8" id="delivery"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">收货地址：</label>
			<div class="formControls col-xs-8 col-sm-8" id="acceptName"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">收货人：</label>
			<div class="formControls col-xs-8 col-sm-8" id="accepter"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">收货人手机号：</label>
			<div class="formControls col-xs-8 col-sm-8" id="acceptPhone"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">快递公司：</label>
			<div class="formControls col-xs-8 col-sm-8" id="wuliu"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">快递单号：</label>
			<div class="formControls col-xs-8 col-sm-8" id="wuliuhao"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">订单备注：</label>
			<div class="formControls col-xs-8 col-sm-8">
				<textarea id="remark" class="textarea" placeholder="请输入备注" rows="3"></textarea>
				<button type="button"  id="saveRemark" class="btn btn-primary radius mt-10">保存修改</button>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">下单时间：</label>
			<div class="formControls col-xs-8 col-sm-8" id="addtime"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">付款时间：</label>
			<div class="formControls col-xs-8 col-sm-8" id="paytime"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">发货时间：</label>
			<div class="formControls col-xs-8 col-sm-8" id="sendtime"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">完成时间：</label>
			<div class="formControls col-xs-8 col-sm-8" id="finishtime"></div>
		</div>
	</form>
</article>

<!--自定义弹窗-->
<span id="msgPop"></span>
</body>
</html>


<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.page.js"></script>
<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/view.js"></script>
<script type="text/javascript" src="js/order.js"></script>
<script type="text/javascript">
	var id = getParamByUrl('id');
	(function () {
		getOne();
		$('#saveRemark').click(function () {
			var remark = $('#remark').val(); // 获取备注输入框的值
			console.log(remark);
			if (!remark.trim()) {
				layer.msg('备注不能为空！', {icon: 2, time: 1500});
				return;
			}

			// 发送 AJAX 请求
			$.ajax({
				type: 'POST',
				url: apis.updateRemark.url, // 后端 API 路径
				data: {
					id: id, // 当前订单 ID
					remark: remark
				},
				success: function (response) {
					if (response.code == 0) {
						layer.msg('备注修改成功！', {icon: 1, time: 1500});
					} else {
						layer.msg('备注修改失败！', {icon: 2, time: 1500});
					}
				},
				error: function () {
					layer.msg('网络错误，请稍后重试！', {icon: 2, time: 1500});
				}
			});
		});
	})();
</script>